<form class="form-horizontal" role="form" id="batchForm">
    <input type="hidden" name="id">
    <div class="form-group">
        <label  class="col-sm-3 control-label">批次编号</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="batchSn" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">产品名称</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="productName" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">种植面积</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="plantingArea" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">预估产量</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="expectedProduction" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">开始时间</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="batchStartTime" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">预期收获时间</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="expectedHarvestTime" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">采摘状态</label>
        <div class="col-sm-9">
            <select type="search" class="form-control status" name="status" updateonlyread></select>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-sm-3 control-label">基地名称</label>
        <div class="col-sm-9">
            <select type="search" class="form-control select2" name="hostId" updateonlyread></select>
        </div>
    </div>
</form>

<script>
    $(function () {
        loadSelectByClassSync("${basePath}/manager/farm/getPickList",null,"status","--请选择采摘状态--","status","statusName");

        $("#batchForm [name='hostId']").loadSelect2(
            "${basePath}/manager/host/getHostListByName",
            "请输入名称查询",2,"hostName","hostName");
        var interval=setInterval(function () {
            if($("#batchForm .select2").length>0){
                $("#batchForm .select2").width("100%");
                clearInterval(interval);
            }
        },100);

    })
</script>

